<html>
<head>
<title>T1.8.1</title>
<script type="text/javascript">
	function addOnClick() {
		var x = document.getElementById('button');
		if (x.addEventListener) x.addEventListener('click', myfunc, false);
		else x.attachEvent('onclick', myfunc);
	}
	function myfunc() {
		if (confirm('Seguro que quieres continuar?')) open('http://www.google.es');
	}
	window.onload = addOnClick;
</script>
</head>
<body>
	<input type="button" id="button" value="Abrir Google" />
</body>
</html>